home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppyshop 2
/
Floppyshop - 2.zip
/
Floppyshop - 2.iso
/
diskmags
/
0022-3.564
/
dmg-0122
/
programm.ers
/
feedback.002
< prev
next >
Wrap
Text File
|
1997-04-16
|
3KB
|
75 lines
Permission to reprint or excerpt is granted only if the
following line appears at the top of the article:
ANTIC PUBLISHING INC.,COPYRIGHT 1986. REPRINTED BY PERMISSION.
Now I will answer some of the question received recently in
the ANTIC ONLINE Feedback (which is considerable faster than
the regular mail this time of year).
Q: The AES manual states "when the application is first
loaded into memory, it should make a DOS call to modify the
application's memory allocation". How is this done?
A: When a GEM application is first loaded by the AES,
all of memory is allocated to it. It must then release that
portion which is past the end of its field length. This is
necessary since the AES file selector and the VDI open
workstation and load fonts calls allocate memory, and the
application itself may need to do its own memory management.
Fortunately, the standard routine APSTART will release
memory for you if it is included as the first item in your
link. It uses a setblock call to TOS, after determining the
proper length of your application. To do so (quoting from
APSTART), all "segment" lengths in the base page are totaled
and 0x100 is added for the base page length.
Q: When opening a blank window for a text screen is
there a way of disabling the mouse so that you don't get a
green patch when you inadvertantly move it?
A: Yes, you can turn off the mouse using the call
graf_mouse(M_OFF, 0x0L); Do this before clearing the window
to white. If you later need to use the mouse, you can
restore it with graf_mouse(M_ON, 0x0L);
Q: Is it possible to patch GEM so that you must first
click on the menu bar to active a drop-down, rather than just
touching it with the cursor? I find it mildly irritating to
open a drop-down menu accidently when I am merely moving the
cursor around.
A: As you may have guessed from the preceding
discussion, the GEM menu algorithm is embedded deeply in the
AES code and is not patchable. The "drop-down" architecture
was chosen over "pull-downs" because it proved easier for
novices. Unfortunately, it does cause problems for
experienced users who mouse around the screen much faster.
One way to partially avoid the problem is to design
applications which have some separation space between the
menu bar and selectable objects. On the Desktop, you can
move file windows away from the bar and then save the new
layout.
Q: How can I support multiple resolutions if I need to
include icons and images in my resource? Do I need to have
an entire separate resource for each resolution, or is there
a simpler way?
A: It is certainly possible to have an alternate
resource for each screen mode, but it introduces problems in
keeping their structure and naming identical. Instead, you
might consider building separate files containing only the
bit image data for your resource, with one version for each
resolution. You might do this by copying the image
definitions from the .C file emitted by the RCS.
After you have loaded the resource, allocate some memory
and read in the appropriate image file. You will then have
to link in the image data by modifying the pointers in your
resource's BITBLK and ICONBLK structures. You will need to
determine in advance which objects must be modified, and in
what order their data occurs in the image file.